#ifndef UDPSOCKET_H
#define UDPSOCKET_H

#include <QUdpSocket>

class UDPSocket
{
public:
    UDPSocket();

    void setServerAddress( const std::string& add , int port );
    std::string getServerAddress();
    int getServerPort();

    void setLocalPort(int local_port);
    int getLocalPort();


    int sendData( const QByteArray &data);

    QByteArray readData();

private:
    QUdpSocket *udpSocket;

    std::string serverAddress;
    int serverPort;

    int localPort;
};

#endif // UDPSOCKET_H
